#include "stdafx.h"
#include "test_game_client.h"
#include "game_client_testDlg.h"

TestGameClient::TestGameClient(Cgame_client_testDlg* dlg, std::string ip, int port) : GameClient(ip, port)
{
	m_dlg = dlg;
}


TestGameClient::~TestGameClient()
{

}

void TestGameClient::onGameClientSendData(const std::string& typeName, const std::string& data) {
	m_dlg->writeLog("send, typeName=%s, data:%s", typeName.c_str(), data.c_str());
}
void TestGameClient::onGameClientRecvData(const std::string& typeName, const std::string& data) {
	m_dlg->writeLog("recv, typeName=%s, data:%s", typeName.c_str(), data.c_str());
}
void TestGameClient::onGameClientDisconnected() {
	m_dlg->writeLog("disconnected");
}
void TestGameClient::onGameClientConnected() {
	m_dlg->writeLog("connected");
}

void TestGameClient::onGameClientRegister(bool isSuccess, int errorCode) {
	m_dlg->writeLog("onGameClientRegister called");
}
void TestGameClient::onGameClientLogin(bool isSuccess, GameClientPlayer* playerInfo) {
	m_dlg->writeLog("onGameClientLogin called");
}
void TestGameClient::onGameClientActivate(bool isSuccess, int errorCode) {
	m_dlg->writeLog("onGameClientActivate called");
}
void TestGameClient::onGameClientJoinDesk(bool isSuccess, int errorCode)  {
	m_dlg->writeLog("onGameClientJoinDesk called");
}
void TestGameClient::onGameClientLeaveDesk(int reason) {
	m_dlg->writeLog("onGameClientLeaveDesk called");
}
void TestGameClient::onGameClientRoomMessage(void* data, int len)  {
	m_dlg->writeLog("onGameClientRoomMessage called");
}
void TestGameClient::onGameClientDeskMessage(void* data, int len) {
	m_dlg->writeLog("onGameClientDeskMessage called");
}
void TestGameClient::onGameClientOtherPlayerJoinDesk(GameClientPlayer* playerInfo)  {
	m_dlg->writeLog("onGameClientOtherPlayerJoinDesk called");
}
void TestGameClient::onGameClientOtherPlayerLeaveDesk(GameClientPlayer* playerInfo){
	m_dlg->writeLog("onGameClientOtherPlayerLeaveDesk called");
}

void TestGameClient::onGameClientCreateFriendDesk(bool isSuccess, int errorCode, const std::string& deskCode)  {
	m_dlg->writeLog("onGameClientCreateFriendDesk called");
}